<template>
	<!-- 辅导员或管理员查看某用户的打卡记录 -->
	
	<view class="root-wrapper">	
		<history-card 
			v-for="(item,index) in info" 
			v-bind:info="item" 
			v-bind:key="index">
		</history-card>
		
		<view class="empty" v-if="info.length === 0">暂无数据</view>
	</view>
	
</template>

<script>
	import historyCard from '../../components/history-clock-card.vue'
	export default {
		components: {
			historyCard
		},
		onLoad: function (option) {
		
			// console.log('check 中的filter_time', option.filter_time)
			
			uni.setNavigationBarTitle({
			    title: option.name
			})
			this.$u.api.getDeptAllInfo({
				'date': '',
				'deptId': 0,
				'userId': option.stu_id		// this.$store.state.deptId
			}).then(msg => {
				console.log('msg',msg)
				this.info = msg.data
			})
		},	
		mounted() {
			
			
		},
		data() {
			return {
				// TODO 根据传入的学号来获取打卡记录
				info:[
					// {						
					// 	"clockTime": "2021-06-26 13:09:28",
					// 	"statClockState": true,
					// 	"clockTemp": 36.0,
					// 	"clockIsAbnormal": false,
					// 	"clockLocation": "北京市-北京市-东城区",
					// 	"clockVaccineDose": 1,
					// 	"clockVaccineTime": "2021-06-10 00:00:00",
					// 	"clockIsIntimate": true,
					// 	"clockTel": "13018994001"
					// },
					// {
					// 	"clockTime": "2021-06-26 13:09:28",
					// 	"statClockState": true,
					// 	"clockTemp": 36.0,
					// 	"clockIsAbnormal": false,
					// 	"clockLocation": "北京市-北京市-东城区",
					// 	"clockVaccineDose": 1,
					// 	"clockVaccineTime": "2021-06-10 00:00:00",
					// 	"clockIsIntimate": true,
					// 	"clockTel": "13018994001"
					// }
				]
			}
		}
	}
</script>

<style>
</style>
